truePart if expression is True and falsePart if expression is False. The type of the returned value is the same as the type of truePart and falsePart.
IIF returns one of two parts, depending on the evaluation of the expression.
The following examples are applicable to both Basic and Crystal syntax:
IIF ({Orders.Order Amount} > 10000, "large order", "standard order")
Returns the String value "large order" if {Orders.Order Amount} is more than $10,000 and the String value "standard order" otherwise.
You can insert a formula field that represents the order amount if the payment has been made already, and is 0 otherwise:
formula = IIF ({Orders.Payment Received}, {Orders.Order Amount}, 0)
IIF ({Orders.Payment Received}, {Orders.Order Amount}, 0)
Choose (index, choice1, choice2, ..., choiceN)
Switch (expr1, value1, expr2, value2, ..., exprN, valueN)
Select statements (Basic syntax)
Select expressions (Crystal syntax)
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |